import threading
import time


class T(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)

    def __del__(self):
        print("__del__")

    def stop(self):
        threading.Thread._Thread__stop(self)

    def run(self):
        while self.is_alive():
            time.sleep(1)
            print("d")
        print("ssss")

a = T()
a.start()

i = 3
while i is not 0:
    time.sleep(1)
    i -= 1
print('a')

a.stop();
print('a')


print('a')
while True:
    time.sleep(1)


